package com.cnc.utils;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class ResourceUtil {
    private static String img;
    private static String path;
    private static String absPath;
    private static int rows;

    static {
        InputStream in = ResourceUtil.class.getClassLoader().getResourceAsStream("res.properties");
        Properties pro = new Properties();
        try {
            pro.load(in);
        } catch (IOException e) {
            e.printStackTrace();
        }
        img=pro.getProperty("defaultImg");
        path=pro.getProperty("StudentDefaultFolder");
        absPath=pro.getProperty("diskUrl");
        rows=Integer.parseInt(pro.getProperty("rows"));
    }

    public static String getAbsPath() {
        return absPath;
    }

    public static String getImg() {
        return img;
    }

    public static String getPath() {
        return path;
    }

    public static int getRows() {
        return rows;
    }
}
